	subroutine simple_dcor2d( nfx,nfy, ngx, ngy, f, g, h)
	double precision f(0:(nfx-1),0:(nfy-1))
	double precision g(0:(ngx-1),0:(ngy-1))
	double precision h(-(ngx-1):(nfx-1),-(ngy-1):(nfy-1))
	integer nfx, nfy, ngx, ngy

	integer i, j, jg, ig, jf, if

	do j = -(ngy-1), (nfy-1)
	    do i = -(ngx-1), (nfx-1)
		h(i,j) = 0.0
	    end do
	end do

	do jg = 0, ngy-1
	    do ig = 0, ngx-1 
		do jf = 0, nfy-1
		    do if = 0, nfx-1
			h(if-ig,jf-jg)=h(if-ig,jf-jg)+f(if,jf)*g(ig,jg)
		    end do
		end do
	    end do
	end do

	return
	end
